package com.zmn.oms.persistence.interfaces.work;

import com.zmn.oms.model.entity.work.OrderWorkEpidemicControl;
import org.apache.ibatis.annotations.Param;

/**
 * 接口描述 工单疫情管控
 *
 * @author fubiao
 * @since 2022/08/15
 */
public interface OrderWorkEpidemicControlDao {

    /**
     *  根据工单ID和节点类型查询疫情信息
     * @param orderId
     * @param workId
     * @param nodeType
     * @return
     */
    OrderWorkEpidemicControl findByWorkIdAndNodeType(@Param("orderId")Long orderId, @Param("workId")Long workId,
                                                     @Param("nodeType")Integer nodeType);

    /**
     *  根据工单ID和节点类型查询
     * @param orderId
     * @param workId
     * @param nodeType
     * @return
     */
    Integer countByWorkIdAndNodeType(@Param("orderId")Long orderId, @Param("workId")Long workId, @Param("nodeType")Integer nodeType);

    /**
     *  新增
     * @param workEpidemicControl
     * @return
     */
    Integer insert(OrderWorkEpidemicControl workEpidemicControl);

    /**
     *  根据工单ID和节点类型修改
     * @param workEpidemicControl
     * @return
     */
    Integer updateByWorkIdAndNodeType(OrderWorkEpidemicControl workEpidemicControl);

    /**
     * 根据工单ID和节点类型删除
     * @param orderId
     * @param workId
     * @param nodeType
     * @return
     */
    Integer deleteByWorkIdAndNodeType(@Param("orderId")Long orderId, @Param("workId")Long workId, @Param("nodeType")Integer nodeType);
}
